package com.imohoo.libs.converter;

import java.util.HashMap;

/**
 * Created by zhaobo on 2016/10/18.
 */
public class SpRequest extends HashMap<String, Object> {
    public static long suser_id = 20;
    public static String suser_token = "63b543010365da697585903d02e54d47";

    private long user_id;
    private String user_token;

    public SpRequest() {
        put("user_id", suser_id);
        put("user_token", suser_token);
    }

    public SpRequest addHead(String cmd, String opt) {
        put("cmd", cmd);
        put("opt", opt);
        return this;
    }

    public SpRequest add(String key, Object value) {
        put(key, value);
        return this;
    }

    public String getUser_token() {
        return (String) get("user_id");
    }

    public SpRequest setUser_token(String user_token) {
        add("user_token", user_token);
        return this;
    }

    public SpRequest setUser_id(long user_id) {
        add("user_id", user_id);
        return this;
    }

    public String getUser_id() {
        return (String) get("user_id");
    }
}
